package model

import "github.com/zeromicro/go-zero/core/stores/sqlx"

var _ InvokeLogModel = (*customInvokeLogModel)(nil)

type (
	// InvokeLogModel is an interface to be customized, add more methods here,
	// and implement the added methods in customInvokeLogModel.
	InvokeLogModel interface {
		invokeLogModel
		withSession(session sqlx.Session) InvokeLogModel
	}

	customInvokeLogModel struct {
		*defaultInvokeLogModel
	}
)

// NewInvokeLogModel returns a model for the database table.
func NewInvokeLogModel(conn sqlx.SqlConn) InvokeLogModel {
	return &customInvokeLogModel{
		defaultInvokeLogModel: newInvokeLogModel(conn),
	}
}

func (m *customInvokeLogModel) withSession(session sqlx.Session) InvokeLogModel {
	return NewInvokeLogModel(sqlx.NewSqlConnFromSession(session))
}
